﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace Simple.Tools
{
    /// <summary>
    /// 
    /// </summary>
    public static class TimeSpanExtension
    {
		/// <summary>
		/// 延迟ticks
		/// </summary>
		/// <param name="length"></param>
		public static void Delay(this long length)
        {
            Task.Delay(new TimeSpan(length)).Wait();
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="days"></param>
        /// <returns></returns>
        public static long GetTimeDayLength(this int days)
        {
            return TimeSpan.TicksPerDay * days;
        }
    }
}
